package cn.lzx.feign;



import cn.lzx.domain.AjaxResult;

import cn.lzx.domain.Store;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class StoreServiceFallbackFactory implements FallbackFactory<StoreService> {
    @Override
    public StoreService create(Throwable throwable) {

        return new StoreService() {
            @Override
            public AjaxResult add(Store store)  {

                return new AjaxResult(false,"服务器繁忙。。");
            }
        };
    }
}
